Method: Virgil::SDK::Client::RequestSigner#self_sign
- Defined in:
- lib/virgil/sdk/client/request_signer.rb
#self_sign(signable_request, private_key) ⇒ Object
Sign passed request with private key.
Args:
signable_request: request for signing.
private_key: private key to sign with.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/virgil/sdk/client/request_signer.rb', line 52 def self_sign(signable_request, private_key) fingerprint = self.crypto.calculate_fingerprint( signable_request.snapshot ) signature = self.crypto.sign( fingerprint.value, private_key ) signable_request.sign_with( fingerprint.to_hex, signature ) end |