v0.1.2
sasl_scram
Um pacote que fornece autenticação sasl/scram. Ambos scram-1 e scram-256 são gerenciados.
4Curtidas 65,1 milDownloads em 30 dias150Pontos Pub
AndroidiOSWebmacOSWindowsLinux
Mecanismos de autenticação Sasl/scram
Texto original em inglês. Visite o GitHub para a versão atual.
Implementation of the Salted Challenge Response Authentication Mechanism in Dart.
A simple usage example:
import 'dart:typed_data';
import 'package:crypto/crypto.dart';
import 'package:sasl_scram/sasl_scram.dart';
void main() {
final bytesReceivedFromServer = Uint8List(0); // No data needed when starting authentication
final authenticator = ScramAuthenticator(
'SCRAM-SHA-256', // Optionally choose hash method from a list provided by the server
sha256,
UsernamePasswordCredential(username: 'dart', password: 'dart'),
);
final bytesToSentToServer = authenticator.handleMessage(
SaslMessageType.AuthenticationSASL, // Get type type from the server message
bytesReceivedFromServer, // Append the remaining bytes
);
print(bytesToSentToServer); // Wrap these bytes with your message which goes back to the server
}
Please file feature requests and bugs at the issue tracker.