This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[test] | |
| fn test_sign_response() { | |
| let key_bin = BASE64_STANDARD.decode("C8OEeCc18V4Krat0iOSHN1ITrbwjJUKpbuxCpkOuK/Y=").unwrap(); | |
| let request = BASE64_STANDARD.decode(b"Cr0AAAABAAAAAAABBHRlc3QDbGFuAAAGAAEIa2VhLWJpbmQAAPoA/wAAAAAAPQtobWFjLXNoYTI1NgAAAGi95UgBLAAghkZktC1IihaLQ2Ll1Sw91GuliJY7/TuIQUajY2KAIPUKvQAAAAA=").unwrap(); | |
| let request_message = Message::from_vec(request.as_slice()).unwrap(); | |
| let signature = request_message.signature(); | |
| let previous_mac = match signature { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[test] | |
| fn test_sign_response() { | |
| let key_bin = BASE64_STANDARD.decode("C8OEeCc18V4Krat0iOSHN1ITrbwjJUKpbuxCpkOuK/Y=").unwrap(); | |
| let request = BASE64_STANDARD.decode(b"Cr0AAAABAAAAAAABBHRlc3QDbGFuAAAGAAEIa2VhLWJpbmQAAPoA/wAAAAAAPQtobWFjLXNoYTI1NgAAAGi95UgBLAAghkZktC1IihaLQ2Ll1Sw91GuliJY7/TuIQUajY2KAIPUKvQAAAAA=").unwrap(); | |
| let request_message = Message::from_vec(request.as_slice()).unwrap(); | |
| let signature = request_message.signature().last().unwrap().clone(); | |
| let dnssec = signature.clone().into_data().as_dnssec().unwrap().clone(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| NiftySecurityHandlers niftySecurityHandlers = new NiftySecurityHandlers() { | |
| @Override | |
| public ChannelHandler getAuthenticationHandler() { | |
| return noOpHandler; | |
| } | |
| @Override | |
| public ChannelHandler getEncryptionHandler() { |