forked from GNUsocial/gnu-social
Magicsig gets toFingerprint output
We give this as a lowercase, sha256 hexadecimal digest of the string: TYPE + "." + BASE64(modulus as bytes) + "." + BASE64(exponent as bytes) Where TYPE in all our cases up until now at least are "RSA"
This commit is contained in:
parent
c5f79fd2f3
commit
57943cad99
@ -198,7 +198,8 @@ class Magicsig extends Managed_DataObject
|
|||||||
// "RSA." + base64(pubkey.modulus_as_bytes) + "." + base64(pubkey.exponent_as_bytes)
|
// "RSA." + base64(pubkey.modulus_as_bytes) + "." + base64(pubkey.exponent_as_bytes)
|
||||||
// We don't want the base64 string to be the "url encoding" version because it is not
|
// We don't want the base64 string to be the "url encoding" version because it is not
|
||||||
// as common in programming libraries. And we want it to be base64 encoded since ASCII
|
// as common in programming libraries. And we want it to be base64 encoded since ASCII
|
||||||
// representation avoids any problems with NULL etc. in less forgiving languages.
|
// representation avoids any problems with NULL etc. in less forgiving languages and also
|
||||||
|
// just easier to debug...
|
||||||
return strtolower(hash('sha256', $this->toString(false, false)));
|
return strtolower(hash('sha256', $this->toString(false, false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user