We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3d14be8 + 7844005 commit b0afb3eCopy full SHA for b0afb3e
cryptoki/src/mechanism/elliptic_curve.rs
@@ -93,6 +93,17 @@ impl EcKdf<'_> {
93
}
94
95
96
+ /// The key derivation function based on sha256 as defined in the ANSI X9.63 standard. The
97
+ /// derived key is produced by concatenating hashes of the shared
98
+ /// value followed by 00000001, 00000002, etc. until we find
99
+ /// enough bytes to fill the `CKA_VALUE_LEN` of the derived key.
100
+ pub fn sha256() -> Self {
101
+ Self {
102
+ kdf_type: CKD_SHA256_KDF,
103
+ shared_data: None,
104
+ }
105
106
+
107
// The intention here is to be able to support other methods with
108
// shared data, without it being a breaking change, by just adding
109
// additional constructors here.
0 commit comments