Struct cloud_storage_signature::signing_key::SigningKey
source · pub struct SigningKey(/* private fields */);
Expand description
The signing key.
Implementations§
source§impl SigningKey
impl SigningKey
sourcepub fn bound_token() -> Self
pub fn bound_token() -> Self
Returns the signing key using the bound token.
https://google.aip.dev/auth/4115 https://cloud.google.com/iam/docs/service-account-creds#google-managed-keys
This only works in Google Cloud Virtual Environments.
The private key is managed by Google and can never accessed directly.
In other words, you can only set use_sign_blob
to true
.
sourcepub fn hmac(access_id: String, secret: String) -> Self
pub fn hmac(access_id: String, secret: String) -> Self
Returns the signing key using the HMAC key.
Not supported yet.
sourcepub fn service_account(client_email: String, private_key: String) -> Self
pub fn service_account(client_email: String, private_key: String) -> Self
Returns the signing key using the service account key.
https://cloud.google.com/iam/docs/service-account-creds#user-managed-keys
This private key can be used directly as a signing key. In other words,
you can set use_sign_blob
to either true
or false
.
sourcepub fn service_account_from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn service_account_from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Returns the signing key using the service account key from the JSON file.
See also: SigningKey::service_account
.
sourcepub fn service_account_from_str<S: AsRef<str>>(s: S) -> Result<Self, Error>
pub fn service_account_from_str<S: AsRef<str>>(s: S) -> Result<Self, Error>
Returns the signing key using the service account key from the JSON string.
See also: SigningKey::service_account
.
Trait Implementations§
source§impl Clone for SigningKey
impl Clone for SigningKey
source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more